﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace df
{
    class config
    {
        //static string host = "http://api.df.cn/";
        static string host = "http://api.dfer.top/";
        public static string api_login = host + "/df_book/api/login", api_reg = host + "/df_book/api/reg", change_pw = host + "/df_book/api/change_pw", api_upload = host + "/df_book/api/upload", api_download = host + "/df_book/api/download";

        public static string rootExe = System.Windows.Forms.Application.StartupPath;//获取当前程序所在目录的绝对路径（原体而非快捷方式）
        public static string formName = "Df书柜", mainMdb = "mdb.df", backupMdb = "df.df", tableNote = "note", tableConfig = "config", switchDb = "switchDb", cur_Index = "cur_Index", cur_Id = "cur_Id", switchAutoSave = "switch_auto_save", auto_save_delay = "auto_save_delay", cloud_nm = "cloud_name", cloud_pw = "cloud_password", cloudNm, cloudPw, token = "token", verNum, mail_ac = "mail_ac", mail_pw = "mail_pw", text_bgcolor = "text_bgcolor", text_font = "text_font", form_location = "form_location", form_size = "form_size", textBgcolor, formLocation, formSize, textFont;
        public static int cloud_userId = 0, autoSaveDelay, curIndex=0, formX, formY, formW, formH;
        public static bool mailSuccess = true, rarSuccess = true;

        static FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
        public static string[] about = new string[] {
                  string.Format(@"
{0}             {1}
", config.formName, config.verNum),string.Format(@"
<!DOCTYPE html>
<html>

	<head>
		<title></title>
	</head>

	<body style='background:#FFFFE1;font-size: 13px;font-family: '宋体';'>
		<hr> 
        QQ：3504725309
		<br>
        E-mail:dbl315@qq.com
		<br>
		<br> http://forum.dfer.top/forum.php?gid=48
<hr> 
		<br>
		<ul>
			<li>CPU：32位</li>
			<li>框架：DotNet3.5</li>
<li>数据库：access</li>
		</ul>
		<hr> 
当前版本 {0}
		<hr> 
		<div style='width: 100%;text-align: right;'>© Df 2021</div>
		

	</body>

</html>


", myFileVersionInfo.ProductVersion)

        };



        public static string[] help = new string[] {
                  string.Format(@"快捷键列表"),string.Format(@"

<!DOCTYPE html>
<html>

	<head>
		<meta charset='UTF-8'>
		<title></title>
	</head>

	<body style='background:#FFFFE1;font-size: 13px;font-family: ' 宋体 ';'>
		<br>

		<hr>
		<ul>

			<li>F3：最小化</li>
			<li>F4：更新；</li>
			<li>F5：显示/隐藏侧栏；</li>
			<li>F6：显示/隐藏搜索框；</li>
			<li>F7：显示/隐藏电子书柜（“键盘”按钮开启的情况下）；</li>
			<li>F11：插入当前时间；</li>

			<hr>

			<li>ctrl+a：全选；</li>
			<li>ctrl+s：保存；</li>
<hr>
<li>鼠标右键：打开工具栏</li>
			<hr>
			<li>自动保存：每{0}秒保存一次</li>
<hr>
	<li>替身：由于下载数据会清空本地原有的所有数据，于是在清空前生成本地原有数据的备份，始终保留上一次的数据，每一次下载都会覆盖一次替身</li>
		</ul>

		<hr>
		<div style='width: 100%;text-align: right;'>© Df 2020</div>

	</body>

</html>


", autoSaveDelay)

        };


    }
}
